import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:kepu/model/Common_list_by_region_entity.dart';
import 'package:kepu/util/http_util.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'common_list_by_region_provider.g.dart';

@riverpod
Future<CommonListByRegionEntity> commonListByRegion(Ref ref,{required int id}) async {
  var response = await DioInstance.instance().get(path: "region/sort_by_region?id=$id");
  return CommonListByRegionEntity.fromJson(response.data);
}
